package string;

/**
 * boolean startsWith(String S):
 * 判断当前字符串是否是以给定的字符串(s)开始的
 *
 * boolean endsWith(String S):
 * 判断当前字符串是否是以给定的字符串(s)结束的
 */
public class StartWithDemo {
    public static void main(String[] args) {
        String str = "thinking in Java";
        boolean start = str.startsWith("think");
        System.out.println(start);
        boolean ends = str.endsWith(".png");
        System.out.println(ends);




    }
}
